﻿@model DirigoEdge.Areas.Admin.Models.ViewModels.BlogSettingsViewModel

@{
    ViewBag.Title = "Blog Settings";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";    
}

<div class="siteSettings">
    <div class="row">
        <div class="twelve columns">
            <h3>Blog Settings</h3>
        </div>
    </div>
    
    @*Blog Title*@
    <div class="row">
        <div class="four mobile-two columns">
            <label class="right inline">Blog Title</label>
        </div>
        <div class="eight mobile-two columns">
            <input type="text" value="@Model.Settings.BlogTitle" class="eight saveField" data-field="BlogTitle" autocomplete="off" />
        </div>
    </div>

    @*Allow Comments*@
    <div class="row">
        <div class="four mobile-three columns">
            <label class="right inline">Initial Blog Count On Blogroll</label>
        </div>
        <div class="eight mobile-one columns">
            <form class="custom">
                <input class="one saveField" type="text" value="@Model.Settings.MaxBlogsOnHomepageBeforeLoad" data-field="MaxBlogsOnHomepageBeforeLoad" autocomplete="off" />

                <div class="settingsComment  hide-for-small">The maximum number of blogs to show on the blog page before the "More" button appears.</div>
            </form>
        </div>
    </div>
    
    
    @*Allow Comments*@
    <div class="row">
        <div class="four mobile-three columns">
            <label class="right inline">Disable Comments Globally</label>
        </div>
        <div class="eight mobile-one columns">
            <form class="custom">
                @{
                    string Checked = Model.Settings.DisableAllCommentsGlobal ? "checked = checked" : "";
                }
                <input class="custom saveField" @Checked type="checkbox" data-field="DisableAllCommentsGlobal" />
                
                <div class="settingsComment  hide-for-small">Blog Comments can be disabled individually - check this option if you never want comments to appear on your blogs.</div>
            </form>
        </div>
    </div>

    @*Use Disqus Comments*@
    <div class="row">
        <div class="four mobile-three columns">
            <label class="right inline">Use Disqus Comments</label>
        </div>
        <div class="eight mobile-one columns">
            <form class="custom">
                @{
                    string sdcChecked = Model.Settings.ShowDisqusComents ? "checked = checked" : "";
                }
                <input class="custom saveField" type="checkbox" @sdcChecked data-field="ShowDisqusComents" />
                <div class="settingsComment hide-for-small"><a href="https://disqus.com/" target="_blank">What's this?</a> Requires a Disqus Shortname</div>
            </form>
        </div>
    </div>

    @*Disqus Id*@
    <div class="row">
        <div class="four mobile-two columns">
            <label class="right inline">Disqus Shortname</label>
        </div>
        <div class="eight mobile-two columns">
            <input type="text" class="eight commentBelow saveField" data-field="DisqusShortName" value="@Model.Settings.DisqusShortName" />
            <div class="settingsComment hide-for-small">Your unique identifier for disqus. <a href="https://disqus.com/admin/signup/" target="_blank">Get an id for your site</a></div>
        </div>
    </div>

    @*Use Facebook Comments*@
    <div class="row">
        <div class="four mobile-three columns">
            <label class="right inline">Use Facebook Comments</label>
        </div>
        <div class="eight mobile-one columns">
            <form class="custom">
                @{
                    string sfcChecked = Model.Settings.ShowFacebookComments ? "checked = checked" : "";
                }
                <input class="custom saveField" type="checkbox" data-field="ShowFacebookComments" @sfcChecked />
                <div class="settingsComment hide-for-small">Requires a Facebook app id from the link below.</div>
            </form>
        </div>
    </div>

    @*Facebook Id*@
    <div class="row hide">
        <div class="four mobile-two columns">
            <label class="right inline">Facebook App Id</label>
        </div>
        <div class="eight mobile-two columns">
            <input type="text" class="eight commentBelow saveField" data-field="FacebookAppId" value="@Model.Settings.FacebookAppId" autocomplete="off"  />
            <div class="settingsComment hide-for-small">Necessary if you want to utilize facebook comments. <a href="https://disqus.com/admin/signup/" target="_blank">Get an app id for your site</a></div>
        </div>
    </div>

    @*Show Facebook Like Button*@
    <div class="row">
        <div class="four mobile-three columns">
            <label class="right inline">Show Facebook Like Button</label>
        </div>
        <div class="eight mobile-one columns">
            <form class="custom">
                @{
                    string sflbChecked = Model.Settings.ShowFacebookLikeButton ? "checked = checked" : "";
                }
                <input class="custom saveField" type="checkbox" data-field="ShowFacebookLikeButton" @sflbChecked />
                <div class="settingsComment  hide-for-small">Does not require a Facebook app id.</a></div>
            </form>
        </div>
    </div>


    @*Save it*@
    <div class="row">
        <div class="two columns">
            <a id="SaveBlogInfo" class="button mobileMarginBottom savePageButton" data-url="/settings/blogsettings/">Save</a>
            <div id="SaveIndicator"></div>
        </div>
    </div>
    
</div>
